#******************************************************************************
# Makefile.am (xpccut/src)
#------------------------------------------------------------------------------
##
# \file       	Makefile.am
# \library    	xpccut
# \author     	Chris Ahlstrom
# \date       	2008-03-06
# \updates     2013-10-05
# \version    	$Revision$
# \license    	$XPC_SUITE_GPL_LICENSE$
#
#  	This file is a makefile for the XPCCUT library project.
#
#     This makefile provides the skeleton needed to build the XPCCUT library
#     using GNU autotools.
#
#------------------------------------------------------------------------------

#*****************************************************************************
# Packing/cleaning targets
#-----------------------------------------------------------------------------

AUTOMAKE_OPTIONS = foreign dist-zip dist-bzip2
MAINTAINERCLEANFILES = Makefile.in Makefile $(AUX_DIST)

#*****************************************************************************
# CLEANFILES includes stuff generated by the coverage/profiling options.
#-----------------------------------------------------------------------------

CLEANFILES = *.gc*

#******************************************************************************
# EXTRA_DIST
#------------------------------------------------------------------------------

EXTRA_DIST =

#*****************************************************************************
# Import version macros from configure.ac
#-----------------------------------------------------------------------------

PACKAGE = @PACKAGE@
VERSION = @VERSION@

XPC_API_MAJOR = @XPC_API_MAJOR@
XPC_API_MINOR = @XPC_API_MINOR@
XPC_API_PATCH = @XPC_API_PATCH@
XPC_API_VERSION = @XPC_API_VERSION@

XPC_LT_CURRENT = @XPC_LT_CURRENT@
XPC_LT_REVISION = @XPC_LT_REVISION@
XPC_LT_AGE = @XPC_LT_AGE@

#******************************************************************************
# Install directories
#------------------------------------------------------------------------------
#
# 		The 'libdir' define is necessary to cause the proper subdirectory to
# 		be made during installation.  'xpclibdir' is defined in the
# 		configure.ac script.  The 'libdir' define is needed for work with
# 		libtool.  Not sure about 'pkglibdr'.
#
# 				pkglibdir=$(xpclibdir)
#
#	Directories and macros:
#
#		prefix        = /usr/local
#		datadir       = /usr/local/share
#		datarootdir   = /usr/local/share
#		libdir        = /usr/local/lib/xpc
#		xpclibdir     = /usr/local/lib/xpc
#		xpcdocdir     = /usr/local/share/doc/xpc-1.1
#		xpcdoxygendir = doc
#		xpcincludedir = /usr/local/include/xpc
#		localedir     = /usr/local/share/locale
#		top_srcdir    = ../../.. [XPC Basic directory]
#		builddir      = /home/ahlstrom/ca/mls/git/XPC Basic-1.1/debug
#
#------------------------------------------------------------------------------

prefix = @prefix@
libdir = @xpclibdir@
datadir = @datadir@
datarootdir = @datarootdir@
xpclibdir = @xpclibdir@
xpcdocdir = @xpcdocdir@
xpcdoxygendir = @xpcdoxygendir@
xpcincludedir = @xpcincludedir@

#******************************************************************************
# localedir
#------------------------------------------------------------------------------
#
#  'localedir' is the normal system directory for installed localization
#  files.
#
#------------------------------------------------------------------------------

localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

#******************************************************************************
# Local project directories
#------------------------------------------------------------------------------
#
#		top_srcdir    = ../../.. [XPC Basic directory]
#		builddir      = /home/ahlstrom/ca/mls/git/XPC Basic-1.1/debug
#
#------------------------------------------------------------------------------

top_srcdir = @top_srcdir@
builddir = @abs_top_builddir@

#*****************************************************************************
# libtool
#-----------------------------------------------------------------------------
#
#     GNU automake assigns, for us: LIBTOOL_DEPS = @LIBTOOL_DEPS@
#
#-----------------------------------------------------------------------------
#
# LIBTOOL_DEPS = @LIBTOOL_DEPS@
#
# libtool: $(LIBTOOL_DEPS)
#    $(SHELL) ./scripts/config.status --recheck
#
#-----------------------------------------------------------------------------

version = $(XPC_API_MAJOR):$(XPC_API_MINOR):$(XPC_API_PATCH)

#******************************************************************************
# AM_CPPFLAGS [formerly "INCLUDES"]
#------------------------------------------------------------------------------
#
#		Defines where to look for header files.
#
#			-	If we build from the XPC Basic root directory, then $top_srcdir
#           is "../.."
#			-	If we build from the xpccut directory, then it is "..".
#			-	If we enter a directory such as "debug", and do "../configure",
#				then it is T B D.
#
#		"../include" is where the xpccut header files are located, and it must
#		be defined even if $top_srcdir is "../..".  So we need two entries,
#		to handle the two possible build situations.
#
#		By convention, we include the "xpc" subdirectory in the C/C++ #include
#		directives, so it is not needed here.
#
#------------------------------------------------------------------------------

AM_CPPFLAGS = \
 -I$(top_srcdir)/include \
 -I$(top_srcdir)/xpccut/include \
 -I../../include

#******************************************************************************
# Building the library
#------------------------------------------------------------------------------
#
# 		We put library files in the src directory.
#
# 		This static library setup is not needed, since libtool also builds the
#		static version:
#
# 			lib_LIBRARIES = ../libxpccut.a
# 			___libxpccut_a_SOURCES =
#				portable_subset.c
#				unit_test_options.c
#				unit_test_status.c
#				unit_test.c
#
#		Other available targets (FYI only):
#
#			libxpccut_la_LIBADD
#
#------------------------------------------------------------------------------

lib_LTLIBRARIES = libxpccut.la

#******************************************************************************
# SOURCES
#------------------------------------------------------------------------------

libxpccut_la_SOURCES =			\
	fuzz.c							\
	portable_subset.c				\
	unit_test_options.c			\
	unit_test_status.c			\
	unit_test.c

#******************************************************************************
# LIBADD
#------------------------------------------------------------------------------
#
#  This item is used if we want to combine other libraries into the
#  currently-built library.
#
#  See xpccut++/src/Makefile.am for more information.
#
# 		libxpccut_la_LIBADD = $(builddir)/xpcxyz/src/libxpcxyz.la
#
#------------------------------------------------------------------------------

#******************************************************************************
# LDFLAGS = -version-info 0:0:0
#------------------------------------------------------------------------------

libxpccut_la_LDFLAGS = -version-info $(version)

#******************************************************************************
# DEPENDENCIES
#------------------------------------------------------------------------------
#
# libxpccut___la_DEPENDENCIES = $(abs_top_builddir)/xpcxyz/src/libxpcxyz.la
#
#------------------------------------------------------------------------------

#******************************************************************************
# uninstall-hook
#------------------------------------------------------------------------------
#
#     We'd like to remove /usr/local/include/xpc-1.0 if it is
#     empty.  However, we don't have a good way to do it yet.
#
#------------------------------------------------------------------------------

uninstall-hook:
	@echo "Note:  you may want to remove $(libdir) manually"

#******************************************************************************
# Debugging targets
#------------------------------------------------------------------------------

show:
	@echo "Install directories:"
	@echo
	@echo "prefix        = $(prefix)"
	@echo "datadir       = $(datadir)"
	@echo "datarootdir   = $(datarootdir)"
	@echo "libdir        = $(libdir)"
	@echo "xpclibdir     = $(xpclibdir)"
	@echo "xpcdocdir     = $(xpcdocdir)"
	@echo "xpcdoxygendir = $(xpcdoxygendir)"
	@echo "xpcincludedir = $(xpcincludedir)"
	@echo "localedir     = $(localedir)"
	@echo
	@echo "Local directories:"
	@echo
	@echo "top_srcdir    = $(top_srcdir) [XPC Basic root directory]"
	@echo "srcdir    		= $(srcdir)"
	@echo "top_builddir  = $(top_builddir)"
	@echo "builddir      = $(builddir)"

#******************************************************************************
# Makefile.am (xpccut/src)
#------------------------------------------------------------------------------
# Local Variables:
# End:
#------------------------------------------------------------------------------
# vim: ts=3 sw=3 noet ft=automake
#------------------------------------------------------------------------------
